package com.rustic.server.vo.user;

import cn.hutool.core.bean.BeanUtil;
import com.rustic.server.po.User;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 表[user]对应VO类
 *
 * @author auto
 */

@Data
public class UserVO {

    /**
     * 自增id
     */
    @ApiModelProperty(value = "自增id", dataType = "Integer")
    private Integer id;

    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名", dataType = "String")
    private String username;

    /**
     * 手机号码
     */
    @ApiModelProperty(value = "手机号码", dataType = "String")
    private String mobile;

    /**
     * 手机号是否验证
     */
    @ApiModelProperty(value = "手机号是否验证", dataType = "String")
    private String mobileVerified;

    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱", dataType = "String")
    private String email;

    /**
     * 邮箱是否验证
     */
    @ApiModelProperty(value = "邮箱是否验证", dataType = "String")
    private String emailVerified;

    /**
     * 昵称
     */
    @ApiModelProperty(value = "昵称", dataType = "String")
    private String nickname;

    /**
     * 头像
     */
    @ApiModelProperty(value = "头像", dataType = "String")
    private String avatar;

    /**
     * 是否锁定
     */
    @ApiModelProperty(value = "是否锁定", dataType = "String")
    private String isLock;

    /**
     * 最后登录ip
     */
    @ApiModelProperty(value = "最后登录ip", dataType = "String")
    private String lastIp;

    /**
     * 最后登录时间
     */
    @ApiModelProperty(value = "最后登录时间", dataType = "Date")
    private Date lastTime;

    /**
     * 注册ip
     */
    @ApiModelProperty(value = "注册ip", dataType = "String")
    private String createIp;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", dataType = "Date")
    private Date createTime;

    /**
     * 通用状态,2正常,3删除
     */
    @ApiModelProperty(value = "通用状态,2正常,3删除", dataType = "int")
    private int dataStatus;

    public UserVO(User user) {
        if (user != null) {
            BeanUtil.copyProperties(user, this);
        }
    }
}
